// __PUBLIC__/js/page/admin/footprint/footprint
require(['../../common'], function() {
  require(['footprint.footprint'])
})

define('footprint.footprint', [
  'jquery',
  'page/grid'
], function($, Grid) {
  'use strict';
 
  $('#J_search').on('click', function(e) {
    e.preventDefault()
    searchData()
  })
  $('#J_more').on('click', function(e) {
    e.preventDefault()
    $(this).next('.more-constraints').toggle()
  })

  function searchData() {
    var userid   = $('#userid').val();
	var email    = $('#email').val();
    var username = $('#username').val();
    if(!username) username = '';
    var title    = $('#title').val();
    var type     = $('#type').val();
    var par_get  ='&email=' + email +'&userid=' + userid + '&username=' + username + '&title=' + title + '&type=' + type ;
    location.href = APP + '?app=admin&m=Footprint&a=footprint' + par_get;
  }
})
